package com.sky.yipinyoufujava.service.imp;


import com.sky.yipinyoufujava.mapper.ShopsMapper;
import com.sky.yipinyoufujava.pojo.from.ShopsFrom;
import com.sky.yipinyoufujava.pojo.goods.Shops;
import com.sky.yipinyoufujava.service.ShopsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopsServiceImp implements ShopsService {
    @Autowired
    private ShopsMapper shopsMapper;
    @Override
    public List<Shops> getAllShop(ShopsFrom shopsFrom) {
        return shopsMapper.getAllShop(shopsFrom);
    }

    @Override
    public void addShop(Shops shops) {
        shopsMapper.addShop(shops);
    }

    @Override
    public void updateShop(Shops shops) {
        shopsMapper.updateShop(shops);
    }

    @Override
    public void deleteShop(List<Integer> ids) {
        shopsMapper.deleteShop(ids);
    }

    @Override
    public Shops getShopByUserId(Object userId) {
        return shopsMapper.getShopByUserId(userId);
    }
}
